// Библиотека каркаса юнит-тестирования CppUnitLite,
// адаптированная для ПАУК.
//
// Имитация самых разных классов.
//
// Файл:  cpp_unit_lite\Fakes.hpp
// Версия $Revision: 870 $
//
// Автор(ы): Кондрашов К.С.
// Правообладатели: ФГУП КБ "Аметист", НИИ СМ МГТУ им. Н.Э.Баумана

#ifndef FAKES_HPP__
#define FAKES_HPP__

#define DEVICE_H__
#define DEV_SERVER_HPP__

#include "pcmlib_if/pcm_if.hpp"
#include "loglib/log.hpp"

#include "cpp_unit_lite/alg_dv_fakes.hpp"

class TestPCM_ITPA : public PCM_ITPA
{
  double getVC() {}
  double getQ() {}
  double getAntennaPosH() {}
  double getPictureRotationAngle (const HTime) {}
  TFPolarCoords getPARg (const HTime) {}
  TFPolarCoords getAPOg (const HTime) {}
  TFPolarCoords getPARp (const HTime) {}
  TFPolarCoords getAPOp (const HTime) {}
  TFRectCoords getRealDirectionPAR() {}

  virtual void fnConvertSK (
    const ESystemCoord sourceSK,  // Исходная система координат
    const ESystemCoord destSK,    // Конечная система координат
    const TFRectCoords * source,  // Исходное значение
    const HTime time,             // Момент времени расчёта
    TFRectCoords * dest)          // Конечное значение
  {
    *dest = *source;
  }
};

struct Device;
struct Directory;
struct Node
{
  Node (void) {}
  virtual ~Node (void) {}
};

struct Visitor
{
  virtual void visit (Device* 	a_dev) = 0;
  virtual void visit (Directory* a_dir) = 0;
  virtual ~Visitor() {};
};

struct Device : public Node
{
  Device (const std::string&) {}
  Device (void) {}
  virtual ~Device () {}

  void setName (const std::string& a_name) { m_name = a_name; }
  std::string getMountPoint (void) { return m_name; }

  virtual void accept (Visitor &a_v) {}

  virtual int read
  (char *const a_pcBuf, unsigned a_unDest, unsigned a_unOffset) {}

  virtual int write
  (const char* const a_pcBuf, unsigned a_unDest, unsigned a_unOffset) {}

private:
  std::string m_name;
};

struct Root
{
  virtual ~Root (void) {}

  enum Prio_
  {
    ePRIO_BEFORE,
    ePRIO_AFTER,
    ePRIO_NONE
  };

  struct Priority
  {
    Priority (Prio_) {}
  };

  void setMountPoint (const std::string a_mount_point) {}
};

struct PoolAttr
{
  PoolAttr (unsigned short a_hi_water = 0,
            unsigned short a_lo_water = 0,
            unsigned short a_increment = 1,
            unsigned short a_maximum = 0):
    hi_water (a_hi_water), lo_water (a_lo_water),
    increment (a_increment), maximum (a_maximum)
  {
    /* void */
  }

  unsigned short hi_water,
           lo_water,
           increment,
           maximum;
};

struct Directory : public Node {};

#include <list>

struct DevServer
{
  DevServer (void) {}
  virtual ~DevServer (void) {}

  DevServer (const std::string&, Root::Priority a_prio = Root::ePRIO_NONE,
      PoolAttr* a_ppool_attr = NULL) {}

  void setPrio (Root::Priority) {}
  void setName (const std::string& a_name) { m_name = a_name; }
  std::string getName (void) { return m_name; }
  void setPoolAttr (PoolAttr* a_ppool_attr) {}

  typedef std::list <Node*> NodesContainer;

private:
  std::string m_name;
};

struct TestLog : public TLogStore {};

#endif // FAKES_HPP__

